import 'package:flutter/services.dart';

class MethodManager {

  static MethodManager? _instance;

  MethodManager._();

  static MethodManager get instance => _instance ??= MethodManager._();

  static const _channel = MethodChannel('com.llliu/toolbox');

  Future<String> callNativeMethod() async {
    final String result = await _channel.invokeMethod('getNativeData');
    return result;
  }

  Future<String> callBackDesktop() async {
    final String result = await _channel.invokeMethod('backDesktop');
    return result;
  }
}